package com.csair.seam.domain.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.csair.seam.domain.mapper.MarketAccountingMapper;
import com.csair.seam.domain.model.entity.MarketAccounting;
import com.csair.seam.domain.model.param.MarketAccountingQueryParam;
import com.csair.seam.domain.service.IMarketAccountingService;

@Service
public class MarketAccountingServiceImp implements IMarketAccountingService {
	
	@Autowired
	private MarketAccountingMapper marketAccountingMapper;

	@Override
	public List<MarketAccounting> queryMarketAccounting(MarketAccountingQueryParam param) {
		if("N".equals(param.getStock())) {
			return marketAccountingMapper.queryMarketAccountingForMolecular(param);
		}
		return marketAccountingMapper.queryMarketAccountingForStock(param);
	}


}
